home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / a-d / 3.0iupdate / macros.lha / GotoMasterPage.rexx < prev    next >
OS/2 REXX Batch file  |  1995-12-20  |  721b  |  26 lines

  1. /* $VER: GotoMasterPage.rexx 1.1a (20.12.95)
  2.    Copyright 1995 Soft-Logik Publishing Corporation
  3.    May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4.  
  5. OPTIONS RESULTS
  6.  
  7. ADDRESS 'PAGESTREAM'
  8.  
  9. 'currentpage'
  10. if result<1 then do    /* current page is a master page */
  11.     'display page lastused'
  12. end
  13. else do                /* current page is a normal page */
  14.     'currentmasterpage'
  15.     mpname=result
  16.     'getdimensions 'stem' masterpage "'mpname'"'
  17.     if stem.sides='SINGLE' then mpname=mpname||':right'
  18.     if stem.sides='DOUBLE' then do
  19.     'currentpage'
  20.     pagenum=result
  21.     if pagenum/2=trunc(pagenum/2) then mpname=mpname||':left'
  22.         else mpname=mpname||':right'
  23.     end
  24.     'display mpg "'mpname'"'
  25. end
  26.